package com.asl.website.sysCompanyInfo.service.impl;

import java.util.List;
import com.asl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.asl.website.sysCompanyInfo.mapper.SysCompanyInfoMapper;
import com.asl.website.sysCompanyInfo.domain.SysCompanyInfo;
import com.asl.website.sysCompanyInfo.service.ISysCompanyInfoService;

/**
 * 企业信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-22
 */
@Service
public class SysCompanyInfoServiceImpl implements ISysCompanyInfoService 
{
    @Autowired
    private SysCompanyInfoMapper sysCompanyInfoMapper;

    /**
     * 查询企业信息
     * 
     * @param id 企业信息主键
     * @return 企业信息
     */
    @Override
    public SysCompanyInfo selectSysCompanyInfoById(Long id)
    {
        return sysCompanyInfoMapper.selectSysCompanyInfoById(id);
    }

    /**
     * 查询企业信息列表
     * 
     * @param sysCompanyInfo 企业信息
     * @return 企业信息
     */
    @Override
    public List<SysCompanyInfo> selectSysCompanyInfoList(SysCompanyInfo sysCompanyInfo)
    {
        return sysCompanyInfoMapper.selectSysCompanyInfoList(sysCompanyInfo);
    }

    /**
     * 新增企业信息
     * 
     * @param sysCompanyInfo 企业信息
     * @return 结果
     */
    @Override
    public int insertSysCompanyInfo(SysCompanyInfo sysCompanyInfo)
    {
        sysCompanyInfo.setCreateTime(DateUtils.getNowDate());
        return sysCompanyInfoMapper.insertSysCompanyInfo(sysCompanyInfo);
    }

    /**
     * 修改企业信息
     * 
     * @param sysCompanyInfo 企业信息
     * @return 结果
     */
    @Override
    public int updateSysCompanyInfo(SysCompanyInfo sysCompanyInfo)
    {
        sysCompanyInfo.setUpdateTime(DateUtils.getNowDate());
        return sysCompanyInfoMapper.updateSysCompanyInfo(sysCompanyInfo);
    }

    /**
     * 批量删除企业信息
     * 
     * @param ids 需要删除的企业信息主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyInfoByIds(Long[] ids)
    {
        return sysCompanyInfoMapper.deleteSysCompanyInfoByIds(ids);
    }

    /**
     * 删除企业信息信息
     * 
     * @param id 企业信息主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyInfoById(Long id)
    {
        return sysCompanyInfoMapper.deleteSysCompanyInfoById(id);
    }
}
